package com.smartleanx.module.hrm.dal.mysql.employee;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.smartleanx.framework.common.pojo.PageResult;
import com.smartleanx.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.smartleanx.framework.mybatis.core.mapper.BaseMapperX;
import com.smartleanx.module.hrm.dal.dataobject.employee.EmployeeEducationExperienceDO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 员工教育经历 Mapper
 *
 * @author tengcj
 */
@Mapper
public interface EmployeeEducationExperienceMapper extends BaseMapperX<EmployeeEducationExperienceDO> {
   default List<EmployeeEducationExperienceDO> getEmployeeEducationExperienceList(Long employeeId) {
        return selectList(new LambdaQueryWrapper<EmployeeEducationExperienceDO>()
                .eq(EmployeeEducationExperienceDO::getEmployeeId, employeeId)
                .orderByDesc(EmployeeEducationExperienceDO::getSort));
    }
}
